<%--
  Created by IntelliJ IDEA.
  User: l
  Date: 2022/8/6
  Time: 11:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>好物信息</title>
    <style>
        table {
            width: 1000px;
            margin: 0 auto;
        }
        #box{
            width: 1000px;
            margin: 0 auto;
            text-align: left;
        }
    </style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="1">
    <tr>
        <td>编号</td>
        <td>名称</td>
        <td>价格</td>
        <td>上架时间</td>
        <td>是否出售</td>
        <td>操作</td>
    </tr>
    <tr>
        <td>${good.gid}</td>
        <td>${good.gname}</td>
        <td>${good.price}</td>
        <td>${good.registerdate}</td>
        <td>${good.sell}</td>
        <c:choose>
            <c:when test="${good.sell eq '否'}">
                <td>
                    <a href="addTradelog.jsp?gid=${good.gid}&gname=${good.gname}&seller=${good.uid}&price=${good.price}">购买</a>
                </td>
            </c:when>
            <c:otherwise>
                <td><a href="#" style="pointer-events: none;">购买</a></td>
            </c:otherwise>
        </c:choose>
    </tr>
</table>
<div id="box">
    <a href="javascript:history.back(-1)" id="back">返回上一页</a>
</div>
</body>
</html>